Page({

  /**
   * 页面的初始数据
   */
  data: {
    LineArr: [{
        imgUrl: '/images/home/jxyp.png',
        text: '精选优品'
      },
      {
        imgUrl: '/images/home/dqcx.png',
        text: '当期促销'
      },
      {
        imgUrl: '/images/home/jhdz.png',
        text: '柬航定制'
      },
      {
        imgUrl: '/images/home/mssp.png',
        text: '免税商品'
      },
      {
        imgUrl: '/images/home/jfdh.png',
        text: '积分兑换'
      },
      {
        imgUrl: '/images/home/jpyd.png',
        text: '机票预订'
      },
      {
        imgUrl: '/images/home/slzx.png',
        text: '商旅专享'
      },
      {
        imgUrl: '/images/home/fjcs.png',
        text: '飞机餐食'
      },
      {
        imgUrl: '/images/home/bxqz.png',
        text: '保险签证'
      },
      {
        imgUrl: '/images/home/jddj.png',
        text: '酒店度假'
      }
    ],
    ad2Arr: [{
        imgUrl: '/images/taobaoxinxuan.png',
        title: '淘宝心选',
        subTitle: '美好而有用'
      },
      {
        imgUrl: '/images/zaodianxinhuo.png',
        title: '造点新货',
        subTitle: '全球创意众筹平台'
      }
    ],
    scrollHeight: 300,
    JPGoodsArr: [{
        imgUrl: '/images/good1.png',
        price: 188,
        delPrice: 288
      },
      {
        imgUrl: '/images/good2.png',
        price: 2099,
        delPrice: 3699
      },
      {
        imgUrl: '/images/good3.png',
        price: 69,
        delPrice: 100
      }
    ],
    goodsList: [{
        imgUrl: '/images/good4.png',
        title: '人工智能电视小米电视4C32英寸',
        price: 699,
        delPrice: 799
      },
      {
        imgUrl: '/images/good5.png',
        title: '米家风冷对开门冰箱483L',
        price: 2099,
        delPrice: 2499
      },
      {
        imgUrl: '/images/good6.png',
        title: '工程挖掘机',
        price: 699,
        delPrice: 799
      },
      {
        imgUrl: '/images/good7.png',
        title: '米家飞天猪足金吊坠',
        price: 2099,
        delPrice: 2499
      },
      {
        imgUrl: '/images/good8.png',
        title: '米家投影仪 青春版',
        price: 699,
        delPrice: 799
      },
      {
        imgUrl: '/images/good9.png',
        title: '米家运动鞋4·黑科技工艺再度升级',
        price: 2099,
        delPrice: 2499
      },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    wx.getSystemInfo({
      success(res) {
        let clientHeight = res.windowHeight;
        let clientWidth = res.windowWidth;
        let ratio = 750 / clientWidth;
        // 微信视口高度
        let rpxHeight = clientHeight * ratio
        that.setData({
          scrollHeight: rpxHeight - 206
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})